<!DOCTYPE html>
<html   xmlns="http://www.w3c.org/1999/xhtml"
        xmlns:h="http://java.sun.com/jsf/html"
        xmlns:p="http://primefaces.org/ui"
        xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head/>
    <h:body>
        <h:form>
            <h:outputText value="Click right..."/>
            
            <p:contextMenu>
                <p:menuitem value="Previous" url="#" onclick="PF('gallery').previous()" />
                <p:menuitem value="Next" url="#" onclick="PF('gallery').next()" />
            </p:contextMenu>
        </h:form>
    </h:body>
</html>
